<template>
<!-- 	<u-skeleton
		rows="2"
		:loading="loading"
		:title="true"
		:rows="7"
		rowsHeight="100rpx"
	> -->
		<view class="container">
<!-- 			<view class="title">{{ detail.title }}</view>
			<view class="news-databox">
				<view class="news-eyedata">
					<image class="news-eye-imgicon" :src="$u.$assets.eye"></image>
					<text class="news-eye-count">{{ $text(detail.volume, 0) }}</text>
				</view>
				<text class="news-data-time">{{ detail.addtime }}</text>
			</view> -->
			<!-- <u-image :src="$imgurl(detail.pic)" mode="widthFix" v-if="detail.pic"></u-image> -->
			<!-- <rich-text :nodes="detail.contents" style="font-size: 26rpx;margin-top: 20rpx;"></rich-text> -->
			<mp-html :content="detail.systext" :domain="Resource_url" :tag-style="styles"  />
		</view>
	<!-- </u-skeleton> -->
</template>

<script>
    import {
        my_load_text
    } from "@/api/useryk.js"
	import mpHtml from 'mp-html/dist/uni-app/components/mp-html/mp-html'
    import {Resource_url, Http_url} from "@/config/config.js"
	/**
	 * 文章详情
	 */
	export default {
		components: {
			mpHtml
		},
		data() {
			return {
				loading: true,
                Resource_url,
				detail: {},
                styles: {
                    p: 'word-wrap: break-word;',
                    div: 'word-wrap: break-word;',
                    span: 'word-wrap: break-word;',
                    label: 'word-wrap: break-word;'
                }
			} 
		},
	
		onLoad() {
			this.getData()
		},
		methods: {
			getData(){
				this.loading = true
				my_load_text()
				.then(res => {
					this.detail = res.data
					uni.setNavigationBarTitle({
						title: res.data.title
					})
					this.loading = false
				}).catch(e => {
					this.$u.toast(e.message || '暂无该条数据')
				})
			},
			// 添加浏览量
			// addViews(id){
			// 	this.$u.request('news.addViews', { id })
			// }
		}
	}
</script>

<style lang="scss" scoped>
    page{
        background-color: #FFF;
    }
	.container {
		padding: 30rpx 30rpx 100rpx 30rpx;
		
		.title{
			font-size: 36rpx;
			font-weight: 500;
			color: #000000;
			margin-bottom: 15rpx;
			text-align: center;
		}
		
		.news-databox{
			display: flex;
			justify-content: space-between;
			align-items: center;
			margin-bottom: 30rpx;
			
			*{
				vertical-align: middle;
			}
			
			.news-eyedata{
				
				.news-eye-imgicon{
					width: 32rpx;
					height: 32rpx;
					margin-right: 10rpx;
					vertical-align: middle;
				}
				
				.news-eye-count{
					font-size: 20rpx;
					font-weight: 300;
					letter-spacing: 0rpx;
					line-height: 14rpx;
					vertical-align: middle;
					color: rgba(94, 94, 94, 1);
				}
			}
			
			.news-data-time{
				font-size: 20rpx;
				font-weight: 300;
				letter-spacing: 0rpx;
				line-height: 12rpx;
				color: rgba(94, 94, 94, 1);
			}
		}
	}
</style>